fixed-hash 0.2.5

Fixed-size hashes
Documentation

Macros to construct fixed-size hash types. Does not export any types.

Examples:

construct_hash!(H256, 32);

Add conversions between differently sized hashes:

construct_hash!(H256, 32);
construct_hash!(H160, 20);
impl_hash_conversions!(H256, 32, H160, 20);

Add conversions between a hash type and the equivalently sized unsigned int:

extern crate uint;
construct_hash!(H256, 32);
use uint::U256;
impl_hash_uint_conversions!(H256, U256);

Build a serde serializable hash type:

construct_hash!(H160, 20, cfg_attr(feature = "serialize", derive(Serialize, Deserialize)));